Add error handling for CSV files with not enough rows