Added additional error handling for CFG/PAM