Add code to check genmask