added flag debug on/off inside settings