add error handling on deleting photos