basic usage of read and write file