You need to use a double quote (") instead of a single quote. So replace this:
'\n'
with this:
"\n"
Read more about it here.
You might want to use \r\n instead if you want your line-endings to be CRLF instead of LF (some Windows editors such as Notepad won’t see a LF linebreak).