Added exception handling around adding security groups.