factor out printing of refactorings