clear a return in write error