I copied your code, added a close() and it works for me. The file is created the first time and is added to after that.
it is not working. Nothing is written to the file.
What does this mean?
What happens if you delete the file before the test? Is it created?
Is there anything in it?
What does the API doc say for FileWriter? It will write characters. \n and \t can be characters.