better logging in debug mode