Update diagnostics.py