updated base script functionality to kill losing process