public override void Close()
{
if (_disposed) return;
this.Flush();
base.Close();
try
{
using (var stream = new FileStream(_path, FileMode.Open))
{
if (stream.Length != _length)
{
stream.SetLength(_length);
}
}
}
catch (Exception)
{
}
}