added a messaging class for error messages