Fixes to logging, and connection pooling.