change readfile.h and writefile.h from struct to class