ignore directory, check if cmd exists before start cmd