fix wrong filename check