¿Violación de intercambio de archivos se produce después de la creación del archivo?

Por lo tanto, estoy intentando crear un archivo .txt y luego escribirle algunos datos tontos. Pero estoy recibiendo una violación de compartir. Siento que puede ser porque estoy intentando crear un StreamWriter para un archivo directamente después de crearlo, pero eso no tiene sentido. Así que estoy un poco perdido. He intentado eliminar todos los demás StreamWriters y Readers de la clase, excepto la línea errónea, y todavía estoy recibiendo una infracción. El error que estoy recibiendo,

IOException: Sharing violation on path C:\Users\USER\Desktop\Accessible\Assets\IO\Books\A community of learners\frog\frog_status.txt
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options)
System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)

Señala a la línea:

StreamWriter sw = new StreamWriter(statusTxtPath);

En la siguiente función:

private IEnumerator GatherStatusInfo(string folderPath, string mediaName) {

        string statusTxtPath = folderPath + @"/" + mediaName + "_status.txt";
        _currentInfoBeingCreated._readingStatusTxtPath = statusTxtPath;

        if(BuildManager.instance._isResetStatusFilesWhenStarting) {
            if(File.Exists(statusTxtPath)) 
                File.Delete(statusTxtPath);
        }

        if(!File.Exists(statusTxtPath)) {
            File.Create(statusTxtPath);
            StreamWriter sw = new StreamWriter(statusTxtPath);
            sw.WriteLine(MediaStatus.Unread);
            sw.WriteLine("0");
            _currentInfoBeingCreated._status = MediaStatus.Unread;
            _currentInfoBeingCreated._pageLastRead = 0; 
            sw.Flush();
            sw.Close();

        } else {

            StreamReader statusReader = new StreamReader(statusTxtPath);
            _currentInfoBeingCreated._status = (MediaStatus) Enum.Parse(typeof(MediaStatus), statusReader.ReadLine());
            _currentInfoBeingCreated._pageLastRead = (int) ConversionUtils.instance.String2Float(statusReader.ReadLine());
            statusReader.Close();
        }

        yield return 0;
    }

¿Alguna idea de por qué ese perro no va a cazar?

Respuestas a la pregunta(5)

Su respuesta a la pregunta