updated to delete newly created file prior to attempting to copy a new file into its location