adding try catch in kill