Updates to error catching.