try to avoid close() in finalize method if at all possible