added server side code for the diagnostics program
put server side diagnostics code in a seperate thread