modified logger class (fixes previous commit)