Update debug mode
Add mage sample