fix to correctly report errors while loading envdef file