Minor fix in checkExt function