Add the closeFile method from dt-dev branch.