You might want to check out the finally block.