Improved CSV error handling