Basic logic for creating new index file in place. Will add ability to update existing file in next commit.