add some diagnostic logs