Fix command output redirection.  Cleanup.