On the code below when a file is saved on notepad the filesystem watcher event is triggered twice even though i have a Workaround in place. Any suggestions for a fix ?
public void OnChanged(object sender, FileSystemEventArgs e)
        {
            try
            {
                    if (MyGlobals.LastFired.Add(TimeSpan.FromSeconds(0)) < DateTime.UtcNow) 
                    {
                        MyGlobals.LastFired = DateTime.UtcNow;
                        System.Threading.Thread.Sleep(2000);
                        Logging.Write_To_Log_File("Item change detected " + e.ChangeType + " " + e.FullPath + " " + e.Name, MethodBase.GetCurrentMethod().Name, "", "", "", "", "", "", 2);
                        MyGlobals.watchers.Clear();
                        foreach (FileSystemWatcher element in MyGlobals.watchers)
                        {
                            element.EnableRaisingEvents = false;
                        }
                        this.BeginInvoke((MethodInvoker)(() => CheckFilesAsync())); //     
                    }
                    else
                    {
                        Logging.Write_To_Log_File("Change within the time limit", MethodBase.GetCurrentMethod().Name, "", "", "", "", "", "", 1);
                    }       
            }
            catch (Exception ex)
            {
                // If exception happens, it will be returned here
            }
            finally
            {
                foreach (FileSystemWatcher element in MyGlobals.watchers)
                {
                    element.EnableRaisingEvents = true;
                }
            }
        }
 
    