It's not specific to WADs. The BS2 emulation boot code will also need to update the state file. Move the struct to Boot and add a helper function that will handle reading + computing the checksum + writing the state file.