improve read file
improve read and write file