added execption tracking