Add some missing error catching