Fix a bug in simple_read_write.hpp