public void dumpTweets() throws IOException {

        BufferedWriter fileWriter = new BufferedWriter(new FileWriter(IndexConfig.statLoc + File.separator + "tweets.txt"));

        for( Long rootId : roots ) {

            Stack<Pair<Long,Integer>> s = new Stack<Pair<Long,Integer>>();

            s.add(new Pair<Long, Integer>(rootId,0));

            while ( !s.isEmpty() ) {

                Pair<Long,Integer> id = s.pop();

                for( int i = 0 ; i <= id.getValue() ; i++ )
                    fileWriter.write("---");
                fileWriter.write(id.getKey() + " : " + tweetMap.get(id.getKey()).getTweetText());
                fileWriter.write('\n');

                if( adjacencyList.containsKey(id.getKey())) {
                    for (Long childId : adjacencyList.get(id.getKey())) {
                        s.push(new Pair<Long, Integer>(childId,id.getValue()+1));
                    }
                }

            }

        }

        fileWriter.close();

    }