catch box errors and abort