If I am writing data to a .txt file, how can I get it to append to a newline instead of append to the first line?

Thanks in advance!