updated for disabling debug mode