UPDATED: Added missing index file generation.