SERVER-10886 Create function to override rawOut destination stream to avoid corrupting tool output