public static void Stop()
{
if (State == loggerState.Started)
{
try
{
sw.Flush();
sw.Close();
fs.Close();
state = loggerState.Stopped;
}
catch (Exception ex)
{
Console.WriteLine("EXCEPTION: An exception occurred while stopping the logger.\n**\t{0}", ex.ToString());
}
}
}