remove logging kludge and add printlog()