Small change to write_to_CSV