take care of directories