What about if the exception raises before you reach the close() statements? Maybe they should be moved to the finally block in the try/catch/finally?