add diagnostics.py script