always flush the log file after a write