update error handing