Made debug functions as static