use csv module to generate download file