Improved debugging.
Commands executed and their output now get written
to a log file in the script root if there are any unexpected problems,
so along with the terse error message the user sees the admin has more
detailed info to try to debug the problem with.