Changed executable check

Changed an "if" executable test to a simpler test.