Added check for external commands