output to logger instead of stderr
todo updated