comments, moving closing of outputstream to finally block