must be in a try finally