Added check to csv_source for .csv file

Also added comments