Handle case where file is empty (don't index invalidly).