I have the following code block which is giving me a headache.
Logically it should work as I am using the filestream providing the lock within the using statement.
Try Thread Synchronization. You can find more details from this link.