added off/on switch for logging, but will use the logging module for
that now