Updated the CSV file generation.