added index on hash, removing file if it does not exists when searching sub