added distrubtions for checking, added logic to test message agreement. added logger for future use.

todo: smoother handle when client crash/disconnect for connections.