The case that fileGroup is undefined is not handled.