public void putFile(String fileName) throws RemoteException {
        /* import local file */
        File file = new File(Common.LocalFSPath + fileName);

        FileInputStream fis = null;
        try {
            fis = new FileInputStream(file);
        }
        catch (FileNotFoundException e) {
            System.err.println("[Error**] File " + fileName + " does not exist!");
            return;
        }
        
        /* RMI call - create hdfs File on NameNode and get chunk distribution 
         * in HDFSFile Object returned bt NameNoe */
        HDFSFile hdfsFile = null;
        try {
            hdfsFile = this.nameNode.createFile(fileName, file.length());
        }
        catch (RemoteException e) {
            e.printStackTrace();
            System.out.println("[Error**] Exception occurs when fetching file " + fileName);
            return;
        }

        ConcurrentHashMap<Integer, HDFSChunk> chunkTable = hdfsFile.getChunkTable();

        /* begin pushing data to DataNodes based on meta data got from NameNode */
        for (int i = 0; i < chunkTable.size(); i++) {
            HDFSChunk chunk = chunkTable.get(i);
            byte[] content = new byte[(int)chunk.getChunkSize()];

            try {
                fis.read(content);
            }
            catch (IOException e1) {
                e1.printStackTrace();
                return;
            }
            /* write 3 replicas */
            for (DataNodeInfo dataNodeInfo : chunk.getReplicaDataNodes()) {
                try {
                    /* get dataNode RMI stub */
                    DataNodeInterface dataNode = getDataNodeService(dataNodeInfo.registryIP);
                    /* DataNode RMI call : addChunk */
                    dataNode.addChunk(fileName, content, chunk.getChunkNum(), clientIP, clientRegPort);
                }
                catch (RemoteException | NotBoundException e2) {
                    //TODO - how to handle?
                    e2.printStackTrace();
                    continue;
                }
            }
        }
        return;
    }