fix(exportfile): Correctly handle empty index arg (closes #4442)