add debug flag for BWTSMem