removed last coma when generating csv file