Created a class for redirecting a stream to Console outputs
(#2571)