catching exception but skipping an iteration - C#