Wrap more logging in debug check.