print ranked reformulations to file