Write the message into log file