Made changes to the script that caused script to crash yesterday. There was need to add more checking because of which there was error and after that ran script on server and it ran successfully. And now all the groups in sunehaG were created correctly but the name of some groups seems to be two long.
Have to work on that.