refactored app-wide config and log handling