Add logging to track down a bug