add diagnose.js