Changed output JSON format to CSV