Added  support of sending error messages