fixed writing to CSV