fixed coding to make sure to check if it is executable before continuing and if it isnt then we stop