Add function about read/write to file.