public void Save(MemoryStream data, string FileName)
        {
            var a = data.ToByteArray();

            var f = new FileReference();

            f.save(a, FileName);
        }