C++ dynamic link library to read and write files