Improve CommandBuilder interface for redirection