Added check for end of file problem.

When end of file, returns an empty array (all rows) for now.