move global var to scope.Add DEBUG variable.