@Override
    public void run() {
        
        log.fine("Lauching file co-ordinator");
        while (true) {
            
            try {
                
                ControlMessage req = (ControlMessage) netMgr.receive();
                if (req.getSourceId() == ConfigMgr.getNodeId()) {
                    continue;
                }
                String file = req.ParseEControl();
                log.log(Level.FINE, "Received query for chunks of file {0}",
                        file);
                Integer[] chunks = null;
                
                Replication repl = Replication.getInstance();
                chunks = repl.getChunkIds(file);
                 
                
                if (chunks != null && chunks.length > 0) {
                    /* 
                     * Acknowledge that we have this file
                     */
                    ControlMessage ack = new ControlMessage ('k', 
                            req.getSourceIp(), prepareChunkListPayload(chunks));
                    netMgr.send(ack, ConfigMgr.getDataPort());
                }
                
                
            } catch (SocketTimeoutException s) {

                // do nothing here
            } catch (IOException ex) {
                
                log.severe("I/O Exception while doing file co-ordination");
                ex.printStackTrace();
            }
        }
    }