made toggleable logging