saving index hash map to file (binary format) and loading from file.