flushing log file after each log entry