Added InterceptingWriter class