Update thread_write.c