FileStream fs = new FileStream(strFile, FileMode.Open);
byte[] aa = new byte[fs.Length - 1];
fs.Read(aa,0,((int)fs.Length - 1));
fs.Close();
fs.Dispose();
File.Delete(strFile);
writeMem();
FileStream fw = new FileStream(strFile, FileMode.Create);
fw.Write(aa, 0, ((int)aa.Length - 1));
fw.Close();
fw.Dispose();
byte[] aa = new byte[fs.Length - 1];
fs.Read(aa,0,((int)fs.Length - 1));
fs.Close();
fs.Dispose();
File.Delete(strFile);
writeMem();
FileStream fw = new FileStream(strFile, FileMode.Create);
fw.Write(aa, 0, ((int)aa.Length - 1));
fw.Close();
fw.Dispose();