Can write the text into file with only a line