enhance extension check.