public void Save() { try { if (!Saving) { Saving = true; Stream stream = File.Open(filepath, FileMode.Create, FileAccess.ReadWrite); BinaryFormatter bFormatter = new BinaryFormatter(); bFormatter.Serialize(stream, this); stream.Close(); } else { Timers.SaveDelay(); } } catch (Exception e) { Log.Out(string.Format("[SERVERTOOLS] Exception in PersistentContainer.Save: {0}", e.Message)); } Saving = false; }