Add some logic for CSV processing