improved logger class