The snippet of code was just supposed to write a string into a text file called \"all_results.txt\". I had errors implementing in File.WriteAllText. After searching the net
Try using lock around your file operations. http://msdn.microsoft.com/en-us/library/c5kehkcz.aspx