fix file extension check