slightly improved logger