Flush write buffer for saving PlayerProfile before closing it.