Add error logic for csv-data