Add writing to CSV