I'm just thinking/typing out loud, but what if you set a flag when PLAYER_LOGOUT is properly used or exited? If the player exits improperly, then the app would know that things didn't end well and make changes appropriately.
Improper exit means the game crashed, which means no disk write.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".