Changed the "\n" to PHP_EOL.