Debug mode added