[#12] [#13] Fixed a minor bug in write method, added a read method.