fixing filesystemwatcher variable scoping issue for logFile