csv parser modified to ignore newline characters at end of file