Need to explictly close writer

This IMHO should be done in context, but it is not...