Fixed error with returning unicode string as well as replaced instances of System.out.write with print statements.