check err and groups
Merge pull request #36 from barisusakli/patch-7

check err and groups