update error catching