Writes text to the log file.