add try finally for parent