Fixing issue #1084 : Added error event handler

Added error event handler to namedpipeoutputchannel