proper checking of photo ext