Added option to turn logging off