add logging back and remove old output code