public bool Close() { try { lock (WriteLock) { os.Flush(); os.Close(); } } catch { // return false; } return true; }