ok... here is my problem

my app open and read c:\myfolder\test.txt using a streamreader...it then closes the streamreader... then after some operations , the app now write to c:\myfolder\test.txt and again the streamwriter this time is closed.... however afterwards when the app wants to rename c:\myfolder ... i get the
"access to path 'c:\myfolder' denied

why??? i closed all the streams i open for the .txt file

edit;

i only get the error only when i use streamwriter!

and sometimes i get a crash instead of an error somethind like vshost.exe error