Corrected index file deletion