Rendering error while writing to file Tag