MP1-4155: fixed flushing of log messages to log file