add debug facilities for mqueue.c