Tag append to file in Java