Added some debug messages. Added infinite loop to main() in xbmain.cpp.