Raise execption if there are less folders than expected.