fixing errors file to ensure no goto fail; code