fix errors + fix logger