@Override
    public void run()
    {
        long lastT = 0;
        while(true)
        {
            if(lastT != file.lastModified())
            {
                try
                {
                    List<String> lines = Files.readAllLines(file.toPath(), Charset.defaultCharset());
                    
                    StringBuilder sb = new StringBuilder();
                    
                    for(String l : lines)
                    {
                        sb.append(l);
                        sb.append('\n');
                    }                   
                    
                    String fileStr = sb.toString();
                    
                    synchronized(this)
                    {
                        tags = TaskTrackerParser.getTags(fileStr);
                        questions = TaskTrackerParser.getQuestions(fileStr);
                        notes = TaskTrackerParser.getNotes(fileStr); 
                        tasks = TaskTrackerParser.getIncompleteTasks(fileStr);
                    }
                    
                    for(FileMonitorListener l : listeners)
                        l.fileChanged();
                }
                catch(IOException e)
                {
                    e.printStackTrace();
                }
                
                lastT = file.lastModified();
            }
            
            try
            {
                Thread.sleep(500);
            }
            catch(InterruptedException e)
            {
            }
        }
    }