Add error handler to attempt cleanup even on fatals