Swapping the index and selection file