close and end in a finally block