save game state in binary file