move BUG() to debug.h