failing on write error