Fixed writing of log message.