average from file to demo the file I/O