Dump data to csv file