Added LOG_OUTPUT flag that determines if log messages are shown, this can be set with the function setouput [0|1]