check whether 'ag' is installed when command is failed