enhancement so that trace in mulitple runs is outputted correctly