Writing a string to a file.