Improve executable detection