added try {} finally {} block to destroy()