Do not loop forever after reaching start of file.