Removed unnecessary instrumentation
Minor mistakes in the xtrace log statements
Tiny bits of additional instrumentation
Changed location of 'close' log messages, since close can be called
multiple times, we only want it logged when the stream is first closed.