updated new file check

a simple if statement to check if the file exists instead of the try
catch