get rid of make_output_dir() by extracting root dentry