added error message when attempting to save duplicate file names

When attempting to save an image under a pre-existing name, will throw error to check user wants to do this.