fixed missing error handling for cascade, fixed typos in the yaml driver, fixed logic for building the bitmask