-minor change making shell detection a little more robust
-removed raising of native Exception class