more logging in debug mode