close importand directories