log error in infer_vellum_type better