Added code to dump to csv