[FOLD] tidy up closure, graceful shutdown beginnings
[FOLD] handle error code in onShutdown
[FOLD] remove detach(), replace with fail()