implement chroot, stat, readStream