fixed bug where empty script files were generated everytime the game was
played...