flush output in case of exception

I needed to add this because one of my planes was throwing an exception and I couldn't see the game state in the log because there was unflushed information.