Why are you changing the file mode flags to ```a```? Are we appending data to csv files?