Create index file only if it is not already present

Fixes #11