FYI -x checks if the item is an executable, -f simply checks if it exists. The -x seems like it would be the better option to use. Otherwise a script could exist but lack +x for some reason and the results would be peculiar to a novice.