added errorhandler with global messages