Update `ExtractCommandTests` so that the writer is closed after the contents have been written. See gh-22993