add patch logging