We are working on directories, so we should close directory instead of file-handle