I have offically mangled this script, but it auto assigns the phsid membership roles for acls
fixed print statment outside of loop
fixed print statment outside of loop
Fixed error msg, and added more debug in the role setting