Fix redirect of output for some command