Added logging chat to file

Adds the option to log chat messages to a file.