Add ability to write index files