if you only need round about figures to stop the loop, you could even approximate the characters per line, and hence exit the loop based entirely on loop count.
if you insist on lookup up file size, keep in mind that writing can be cached/buffered, and some system calls for filesystem info are cached unless a specific "full" system call is issued.