add some debug logging