@Override
        public void run() {
            LoadFileStructure();
            while (true) {
                try {
                    synchronized (mChunkServers) {
                        for (MySocket chunkSocket : mChunkServers.values()) {
                            if (chunkSocket.hasData()) {
                                System.out.println("Reading bytes from " + chunkSocket.GetSocket().getLocalAddress() + ((InetSocketAddress) chunkSocket.GetSocket().getLocalSocketAddress()).getPort());
                                Message messageReceived = new Message(chunkSocket.ReadBytes());
                                Message messageSending = ParseChunkInput(messageReceived);
                                messageSending.SetSocket(chunkSocket);
                                mPendingMessages.push(messageSending);
                            }
                        }
                    }
                    while (!mPendingMessages.isEmpty()) {
                        mPendingMessages.pop().Send();
                    }
                    synchronized (mSocketsToClose) {
                        while (!mSocketsToClose.isEmpty()) {
                            String socketID = mSocketsToClose.pop();
                            if (mClients.containsKey(socketID)) {
                                mClients.get(socketID).Close();
                            } else if (mChunkServers.containsKey(socketID)) {
                                RemoveLocationFromFiles(socketID);
                                mChunkServers.get(socketID).close();
                                mChunkServers.remove(socketID);
                            } else {
                                System.out.println("Unable to find socket: " + socketID);
                            }
                        }
                    }

                    this.sleep(100);
                } catch (Exception e) {

                    System.out.println(e.getMessage());
                }

            }
        }