WIP: fix errorHandler so exit event fires