Flush the log file after printing.

Otherwise you don't see the log output with tail -f until after the game quits.