added check of http error when check element existence