Fix possible error trying to delete nonexistent file
Add some indexes