Added error event handler to process.