check extension against provided one