Stylus diagnostics