Changed writer object to populate CSV with all data from loop