Error reporting

Added Messenger class with error reporting function.