Implement debug mode