Adds code to detect if the csv is valid or not
merge