Adding partial code for Diagnostic Service