mes: Better error reporting.