add --enable-logging switch, default to no logging