Master .h and .cpp file for read/write process