Adding diagnostics