tif writing working