handle error on trace add