[0.3.1] add test and logging, fix disconnect

Signed-off-by: Eli Skeggs <eskeggs@globesherpa.com>