I am making a class that is to help with saving some strings to a local text file (I want to append them to that file and not overwrite so that it is a log file). When I write with the streamwriter to find the end of the previous text, I get an error "the file is not available as it is being used by another process". I looked into this problem on MSDN and I got very little help. I tried to eliminate some variables so I removed the streamreader to check was that the problem and it was. When I tried to write to the file then it worked and I got no error so this made me come to the conclusion that the problem arose in the streamreader. But I could not figure out why? 

Here is the code: 

```
 Public Sub SaveFile(ByVal Task As String, ByVal Difficulty As Integer, ByVal Time_Taken As String)
    Dim SW As String = "C:/Program Files/Business Elements/Dashboard System Files/UserWorkEthic.txt"
    Dim i As Integer
    Dim aryText(3) As String
    aryText(0) = Task
    aryText(1) = Difficulty
    aryText(2) = Time_Taken
    Dim objWriter As System.IO.StreamWriter = New System.IO.StreamWriter(SW, True)
    Dim reader As System.IO.StreamReader = New System.IO.StreamReader(SW, True)
    reader.ReadToEnd()
    reader.EndOfStream.ToString()
    For i = 0 To 3
        objWriter.WriteLine(aryText(reader.EndOfStream + i))
    Next
    reader.Close()

    objWriter.Close()

End Sub

```