tif writing close