some refactoring to make Java 7 and 8 versions produce more similar base.maude files
update an output file