close opened streams in finally block