add some try finally's - to be cautious