added diagnostics code for displaying report.