private static void LogIndexFile(string path, string text)
{
StreamWriter indexFile;
if (!File.Exists(string.Format(@"{0}\Index.log", path)))
{
indexFile = File.CreateText(string.Format(@"{0}\Index.log",path));
}
else
{
indexFile = File.AppendText(string.Format(@"{0}\Index.log",path));
}
indexFile.WriteLine(text);
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine(text);
indexFile.Close();
}