anchor.diff:          ToMatch = {ProxyNodes - ProxyNodesWritten, SyncNodes + ProxyNodesWritten},
           AssertLocations = fun() ->
               VerAns = VerifyLocation(),
  -%%            ct:print("Locations1 ~p", [{Offset, File, VerAns}]),
               Flattened = lists:flatten(VerAns),
  -            ct:print("Locations1 ~p", [{Offset, File, Flattened, length(ProvIDs)}]),
   
               ZerosList = lists:filter(fun(S) -> S == 0 end, Flattened),
               LocationsList = lists:filter(fun(S) -> S == SyncProvidersCount end, Flattened),
               {length(ZerosList), length(LocationsList)}
           end,
  -        ct:print("ToMatch ~p", [{ToMatch, AssertLocations()}]),
  -%%        ?match(ToMatch, AssertLocations(), Attempts),
  +        ?match(ToMatch, AssertLocations(), Attempts),
   
   
           LocToAns = Verify(fun(W) ->
  
positive.code:             VerAns = lists:map(fun({W, Uuid}) ->
                  count_links(W, Uuid)
              end, VerAns0),
              ct:print("Links ~p", [{DSize, Deleted, VerAns}]),
  
              ZerosList = lists:filter(fun(S) -> S == 0 end, VerAns),
              SList = lists:filter(fun(S) -> S == 2*DSize + 1 end, VerAns),
              {length(ZerosList), length(SList)}
          end,
          ToMatch = {ProxyNodes - ProxyNodesWritten, SyncNodes + ProxyNodesWritten},
          ct:print("ToMatch ~p", [{ToMatch, AssertLinks()}]),
          ?match(ToMatch, AssertLinks(), Attempts)
      end,
      VerifyDirSize(Level2Dir, length(Level3Dirs) + length(Level3Dirs2) + 1, 0),
      ct:print("Stage 7"),
      Level3Dirs2Uuids = lists:map(fun(D) ->
          VerifyStats(D, true)
      end, Level3Dirs2),
      ct:print("Stage 8"),
      Level4FilesVerified = lists:map(fun(F) ->
          VerifyFile(F)
      end, Level4Files),
      ct:print("Stage 9"),
      VerifyDirSize(Level3Dir, length(Level4Files), 0),
      ct:print("Stage 10"),
      lists:map(fun({_, F}) ->
          WD = lists:nth(crypto:rand_uniform(1,length(Workers) + 1), Workers),
          ct:print("DEL ~p", [{WD, F}]),
          ?assertMatch(ok, lfm_proxy:unlink(WD, SessId(WD), {path, F}))
      end, Level4Files),
      ct:print("Stage 11"),
      lists:map(fun(D) ->
          WD = lists:nth(crypto:rand_uniform(1,length(Workers) + 1), Workers),
          ct:print("DelX ~p", [{WD, D}]),
          ?assertMatch(ok, lfm_proxy:unlink(WD, SessId(WD), {path, D}))
      end, Level3Dirs2),
      ct:print("Stage 12"),
      lists:map(fun(F) ->
          VerifyDel(F)
      end, Level4FilesVerified),
      ct:print("Stage 13"),
      lists:map(fun({D, Uuid}) ->
          VerifyDel({D, Uuid, []})
      end, lists:zip(Level3Dirs2, Level3Dirs2Uuids)),
      ct:print("Stage 14"),
      VerifyDirSize(Level3Dir, 0, length(Level4Files)),
      ct:print("Stage 15"),
  
      VerifyDirSize(Level2Dir, length(Level3Dirs) + 1, length(Level3Dirs2)),
      ct:print("Stage 16"),
  
      lists:foreach(fun(W) ->
          Level2TmpFile = <<Dir/binary, "/", (generator:gen_name())/binary>>,
          CreateFileOnWorker(4, Level2TmpFile, W),
          VerifyFile({4, Level2TmpFile})
      end, Workers),
      ct:print("Stage 17"),
  
      lists:foldl(fun(W, Acc) ->
          OpenAns = lfm_proxy:open(W, SessId(W), {path, Level2File}, rdwr),
  
negative.code: 
      VerifyFile({2, Level2File}),
  
      lists:foreach(fun(W) ->
          Level2TmpDir = <<Dir/binary, "/", (generator:gen_name())/binary>>,
          ?assertMatch({ok, _}, lfm_proxy:mkdir(W, SessId(W), Level2TmpDir, 8#755)),
          VerifyStats(Level2TmpDir, true),
  
          lists:foreach(fun(W2) ->
              Level3TmpDir = <<Level2TmpDir/binary, "/", (generator:gen_name())/binary>>,
              ?assertMatch({ok, _}, lfm_proxy:mkdir(W2, SessId(W2), Level3TmpDir, 8#755)),
              VerifyStats(Level3TmpDir, true)
          end, Workers)
      end, Workers),
      lists:map(fun(D) ->
          ?assertMatch({ok, _}, lfm_proxy:mkdir(Worker1, SessId(Worker1), D, 8#755))
      end, Level3Dirs),
      lists:map(fun(D) ->
          VerifyStats(D, true)
      end, Level3Dirs),
      lists:map(fun(D) ->
          ?assertMatch({ok, _}, lfm_proxy:mkdir(Worker1, SessId(Worker1), D, 8#755))
      end, Level3Dirs2),
      ?assertMatch({ok, _}, lfm_proxy:mkdir(Worker1, SessId(Worker1), Level3Dir, 8#755)),
      lists:map(fun(F) ->
          CreateFile(F)
      end, Level4Files),
      VerifyDirSize = fun(DirToCheck, DSize, Deleted) ->
          VerAns0 = Verify(fun(W) ->
              CountChilden = fun() ->
                  LSAns = lfm_proxy:ls(W, SessId(W), {path, DirToCheck}, 0, 200),
                  ?assertMatch({ok, _}, LSAns),
                  {ok, ListedDirs} = LSAns,
                  length(ListedDirs)
              end,
              CS = CountChilden(),
              ?match(DSize, CountChilden(), Attempts),
  
              StatAns = lfm_proxy:stat(W, SessId(W), {path, DirToCheck}),
  