Improved logger class