Restore error handler, probably change this to minit later