Added sample code for text/binary file READ/WRITE