fix: remove old declaration of errorHandler
fix: moving errorHandler to separate configure, per PR feedback