Corrected image deletion if no file uploaded