Modified the buffer_read stuff to instead use iteration on the file pointer (I think achieving the desired functionality).  The code errors in page_analyze with an out of bounds error.