using loops for file io operations 396929