Close the file writer.