change the line feed to \r\n to fit the format of csv file