BS-10723, add debug mode