improved logging in main class