add option to turn of logging