debug add and error update