adding more logging when debugging is turned on