removed echo to console; if -n instead of -z