fix isValidForIndex should also whitelist yml file #347