Changed from JSON to csv output