update import to close the handle when done