Better error messaging in maintenance scripts

Hopefully no more <<the operation failed with error: "1">>.  "1" isn't a
useful error message.  Nope.

Change-Id: I3c7d0eb67e33335f08472d8d8c0518ad9b9a009a
Merge "Better error messaging in maintenance scripts"