added some debug statements
experimenting with some different communication patterns.
added support for debugging, bad block output now in a better format
logging support addition for certain methods