SyntaxFix
Write A Post
Hire A Developer
Questions
You call writer.close(); in writeToFile so the writer has been closed the second time you call writeToFile.
writer.close();
writeToFile
Why don't you merge FileStatus into writeToFile?
FileStatus