Fix a couple bugs; index count instead of size, and add file size into each index entry.