save data in a csv file (test version)