Update UIClass.java

changed writeFile() method to output to txt file