Write the message into the log file