revised version of hdfs_file hdfs_directory and its test case