WriteAndClose now returns a future, so you know when it's done writing.