[DF-4620] Fixed hang up on write error.