error checking for csv