anchor.diff:      end, MajorityNodes);
   precondition(#state{nodes=Nodes, joined_nodes=JoinedNodes}, {call, _Mod, join_cluster, [Node, JoinedNodes]}) -> 
       %% Only allow dropping of the first unjoined node in the nodes list, for ease of debugging.
  -    debug("precondition join_cluster: invoked for node ~p joined_nodes ~p", [Node, JoinedNodes]),
  +    precondition_debug("precondition join_cluster: invoked for node ~p joined_nodes ~p", [Node, JoinedNodes]),
   
       ToBeJoinedNodes = Nodes -- JoinedNodes,
  -    debug("precondition join_cluster: remaining nodes to be joined are: ~p", [ToBeJoinedNodes]),
  +    precondition_debug("precondition join_cluster: remaining nodes to be joined are: ~p", [ToBeJoinedNodes]),
   
       case length(ToBeJoinedNodes) > 0 of
           true ->
               ToBeJoinedNode = hd(ToBeJoinedNodes),
  -            debug("precondition join_cluster: attempting to join ~p", [ToBeJoinedNode]),
  +            precondition_debug("precondition join_cluster: attempting to join ~p", [ToBeJoinedNode]),
               case ToBeJoinedNode of
                   Node ->
  -                    debug("precondition join_cluster: YES attempting to join ~p is ~p", [ToBeJoinedNode, Node]),
  +                    precondition_debug("precondition join_cluster: YES attempting to join ~p is ~p", [ToBeJoinedNode, Node]),
                       true;
                   OtherNode ->
  -                    debug("precondition join_cluster: NO attempting to join ~p not ~p", [ToBeJoinedNode, OtherNode]),
  +                    precondition_debug("precondition join_cluster: NO attempting to join ~p not ~p", [ToBeJoinedNode, OtherNode]),
                       false
               end;
           false ->
  -            debug("precondition join_cluster: no nodes left to join.", []),
  +            precondition_debug("precondition join_cluster: no nodes left to join.", []),
               false %% Might need to be changed when there's no read/write operations.
       end;
   precondition(#state{joined_nodes=JoinedNodes}, {call, _Mod, leave_cluster, [Node, JoinedNodes]}) -> 
       %% Only allow dropping of the last node in the join list, for ease of debugging.
  -    debug("precondition leave_cluster: invoked for node ~p joined_nodes ~p", [Node, JoinedNodes]),
  +    precondition_debug("precondition leave_cluster: invoked for node ~p joined_nodes ~p", [Node, JoinedNodes]),
   
       ToBeRemovedNodes = JoinedNodes,
  -    debug("precondition leave_cluster: remaining nodes to be removed are: ~p", [ToBeRemovedNodes]),
  +    precondition_debug("precondition leave_cluster: remaining nodes to be removed are: ~p", [ToBeRemovedNodes]),
   
       case length(ToBeRemovedNodes) > 3 of
           true ->
               ToBeRemovedNode = lists:last(ToBeRemovedNodes),
  -            debug("precondition leave_cluster: attempting to leave ~p", [ToBeRemovedNode]),
  +            precondition_debug("precondition leave_cluster: attempting to leave ~p", [ToBeRemovedNode]),
               case ToBeRemovedNode of
                   Node ->
  -                    debug("precondition leave_cluster: YES attempting to leave ~p is ~p", [ToBeRemovedNode, Node]),
  +                    precondition_debug("precondition leave_cluster: YES attempting to leave ~p is ~p", [ToBeRemovedNode, Node]),
                       true;
                   OtherNode ->
  -                    debug("precondition leave_cluster: NO attempting to leave ~p not ~p", [ToBeRemovedNode, OtherNode]),
  +                    precondition_debug("precondition leave_cluster: NO attempting to leave ~p not ~p", [ToBeRemovedNode, OtherNode]),
                       false
               end;
           false ->
  -            debug("precondition leave_cluster: no nodes left to remove.", []),
  +            precondition_debug("precondition leave_cluster: no nodes left to remove.", []),
               false %% Might need to be changed when there's no read/write operations.
       end;
   precondition(#state{majority_nodes=MajorityNodes, minority_nodes=MinorityNodes, node_state=NodeState, joined_nodes=JoinedNodes}, {call, Mod, Fun, [Node|_]=Args}=Call) -> 
  -    debug("precondition fired for node function: ~p, majority_nodes: ~p, minority_nodes ~p", [Fun, MajorityNodes, MinorityNodes]),
  +    precondition_debug("precondition fired for node function: ~p, majority_nodes: ~p, minority_nodes ~p", [Fun, MajorityNodes, MinorityNodes]),
       case lists:member(Fun, node_functions()) of
           true ->
               case ?BIAS_MINORITY andalso length(MinorityNodes) > 0 of
                   true ->
  -                    debug("precondition fired for node function where minority is biased: ~p, bias_minority: ~p, checking whether node ~p is in minority", [Fun, ?BIAS_MINORITY, Node]),
  +                    precondition_debug("precondition fired for node function where minority is biased: ~p, bias_minority: ~p, checking whether node ~p is in minority", [Fun, ?BIAS_MINORITY, Node]),
                       case lists:member(Node, MinorityNodes) of
                           true ->
                               debug("=> bias towards minority, write is going to node ~p in minority", [Node]),
  
positive.code:                            {num_nodes, ?NUM_NODES},
                             {cluster_nodes, ?CLUSTER_NODES}]),
  
      lager:info("Started nodes: ~p", [Nodes]),
  
      %% Insert all nodes into group for all nodes.
      true = ets:insert(?MODULE, {nodes, Nodes}),
  
negative.code:                     end
          end;
      false ->
              postcondition_debug("general postcondition fired for ~p:~p with response ~p", [Mod, Fun, Res]),
              %% All other commands pass.
              false
      end.
  