Some changes in read_write.py