tests
tocsv saves the name of the file