DRY: test if executable exists is abstracted in a function