check pathinfo for extension