modified savePhoto() logic in UploadPhoto business class