Flush log file output to avoid slow buffering