Beefing up error handling, inclusing reporting of non-zero shell retuen codes