[C# test app] Fixed closure issue on rerunning tests