fixed error in logging exception