Fix some db connection leaks using new logging tool.