Migrates the json files generated by middleware to a single csv file.