modified fread error missing i to start at beginning of file