Fix issues uncovered by static analysis

Use combined catch