readd loging code that was removed because of possible exceptions in the constructor. reason logger must never throw exceptions