change end line from \r\n to \n.