update write.c