in reply to how to deal with error message

If you have things like this on your network, you should seriously consider nagios.

Imagine you want to receive an email alert if there are 5 files in directory x, but if there are 20 or more, send a message to your cell phone instead. Right.

There's info out there for writing plug ins for nagios, so you can customize what happens.