Improved error handling when CSV file parsing fails.