got csv file writing to work