sample file i/o using different techniques