Save and cleanup data after building the leaderboard, fixes errors on
shutdown