close writer