minor changes for  catching errors from CSV file