fix the read file bug and add the write file….