added consistency check for csv files