Add example for redirecting output to a custom stream