Perhaps your script is throwing an error BEFORE it gets to the show group command. Try commenting everything out but the show group and see if that works. If so, then backtrack from there.