Debug code to track down the infinite loop problem on the host