modified doc and terminate script