Add iteration index to output