Fixes #1141 and removed StubShutdownHandler
Properly handle all errors.
Merge pull request #1143 from coolhome/patch-1

Fixes #1141