Changed exception caught to AggregateException since we use linq. The inner exception will inform us that index is out of range.