adding parser and error handling for csv files