DEVIDM-118: avoid messing up the env for broken conf.
DEVIDM-118: bail out on exception during required setup
DEVIDM-118: reuse variable.
Merge pull request #134 from iceglow/DEVIDM-118

DEVIDM-118: avoid messing up the env for broken conf.