fixed #140904 (Logger added)

Some refactoring as well