names: calculate output prefix once, use globpath