Catch errors

(was addressed in a later PR)