Add the loading index from file function.