switched some logging to only when enabled