Update sample js to use \r\n when printing to file