improved logging in