move debug logging to shims