Add debug switch; better exclusion handling