ammand last commit

We should not close the directory twice in the normal case