configuration and logging refactoring