Added commant pathcheck and fix SSAPI