add cmakefile and test examples for reading writing data file