add _filedir and _known_hosts function + dependency functions