Add callback support to ReportError as in mj-single.js