public boolean getFile(String DFSFileName, String localFileName){
        /* Send Get-File-Request to NameNode */
        DFSMessage getFileNameNodeReq = new DFSMessage(DFSMessageType.GetFileClientReqMsg, DFSFileName, null);
        DFSMessage getFileNameNodeResp = DFSMessageSender.sendMessage(getFileNameNodeReq, this.nameNode);
        if(getFileNameNodeResp == null || getFileNameNodeResp.getType() != DFSMessageType.GetFileNameNodeRespMsg || getFileNameNodeResp.getFirst() == null){
            System.out.println("Failed to send Get-File-Request (File: " + DFSFileName + ") to NameNode (" + this.nameNode.getIp() + ":" + this.nameNode.getPort() + ")");
            return false;
        }else{
            System.out.println("Sent Get-File-Request (File: " + DFSFileName + ") to NameNode (" + this.nameNode.getIp() + ":" + this.nameNode.getPort() + ")");
        }
        
        /* Get blocks from corresponding DataNodes */
        List<DFSNode> blkLocations = (List<DFSNode>)getFileNameNodeResp.getFirst();
        try{
            BufferedWriter bw = new BufferedWriter(new FileWriter(localFileName));
            for(int i = 0; i < blkLocations.size(); i++){
                DFSMessage getFileDataNodeReq = new DFSMessage(DFSMessageType.GetFileClientReqMsg, this.getBlkNameByFileName(DFSFileName, i), null);
                DFSMessage getFileDataNodeResp = DFSMessageSender.sendMessage(getFileDataNodeReq, blkLocations.get(i));
                if(getFileDataNodeResp == null || getFileDataNodeResp.getType() != DFSMessageType.GetFileDataNodeRespMsg || getFileDataNodeResp.getFirst() == null){
                    System.out.println("Failed to get block (" + this.getBlkNameByFileName(DFSFileName, i) + ") from DataNode (" + blkLocations.get(i).getIp() + ":" + blkLocations.get(i).getPort() + ")");
                    return false;
                }
                List<String> lines = (List<String>)getFileDataNodeResp.getFirst();
                for(String s : lines){
                    bw.write(s);
                    bw.newLine();
                }
                bw.flush();
            }
            bw.close();
        }catch(Exception e){
            e.printStackTrace();
            System.out.println("Failed to send Get-File-Request (File: " + DFSFileName + ")");
            return false;
        }
        System.out.println("Sent Get-File-Request (File: " + DFSFileName + ")");
        return true;
    }