Close should be done in finally block.