CSV file output is working