Added code to build the file index