wiser resource finding with extension checking.