I think you need to close writers that you open like this.