Re-added extension check