Add basic threading support to the file agent

Add basic hand made threading using dot net 2