Dumps data into CSV file