Added Debug Mode support.