Better diagnostics output registration.