logging to track down bug