Added strat of file extension check code