use error trapping
try to open the file
if it already exists consider offering the user the chance to use a new name, or consider the option of renaming the file or deleting it
remove that particular error trapping set
then write to your file.
...sounds dumb but remember to turn warning back on as soon as you have finished the section that you wanted the warnings off on.. otherwise you could spend hours tearing you hair out because you have switched off warnings.