output csv data at end of execution