Util.printf, Util.fprintf
implementation of Rewriting.normalize