If the debug option is true and not a function, console.log the debug info
Flattening out the GlobNode expansion heirarchy