Write the message to the log file