load idx files in main