Print correctly header while summing logs