Added basic debug mode