add fix_references script
output reference index to file