Write a String to txt file.