added to check if .csv file already exists, if it does, delete and recreate it.