Fix getGroupId by iterates the file