Improved logger and Connection approach