adding diagnostics output