You look good, and I'm sure the new line is correctly written in the file. The only reason I can think of is to open the file with an editor that does not treat \n as a line separator, it considers the \r\n pair as a line separator (for example, Notepad on Windows).
So, you can either write a new line using write.print("\r\n") , or simply open the file with some other editors, for example vim . No matter which editor you use to open the file, a newline appears.
neevek
source share