Changed overwrite confirmation

Changed overwrite confirmation and switched order between determining file name and processing image modifications