Add option to toggle logging