Fix console spaming by debug function on mod checking for global variable to exist.