Fixed error in file extension check.