EXIT trap to catch unbound variables and cleanly exit; return code is still 1 if there were errors