close the writer when done!