added logging option (v3.4.4)