Added a new log flag LOG_FLUSH that forces flushing the log after every