integrate index-file skip with the rest of similar logic.