build_hol_light_contexts: stop early on error and add error reporting