log instead of stderr
extra check for null count on errors