better error handling for csv import