Adding code for Diagnostic Service