Converted channel buffer storage to a FlowDocument, and added loging.