Logging and stream type

* Change from buffered to unbuffered streams to match example #10
* Add interface for logging
* Implement interface in example