used a global variable to improve support accross modules, also added support for SAND_LOG to set logs to view, off by default.