added SetWithLog()