add DEBUG macro to debug mode
update debug mode