Saves a message to a file.