improve extension check
suppress error of cat