msgcollector: improved error handler