Update read_write.cpp