anchor.diff:                          ok ->
                               lock(SessionId, time_compat:erlang_system_time(seconds), EndTime);
                           {error, Reason} ->
  -                            {error, lists:flatten(io_lib:format("Error waiting for lock release, reason: ~w", [Reason]))}
  +                            {error, lists:flatten(io_lib:format("Error waiting for lock release, reason: ~s",[Reason]))}
                       end;
                   {error, Reason} ->
  -                    {error, lists:flatten(io_lib:format("Error obtaining lock status, reason: ~w", [Reason]))}
  +                    {error, lists:flatten(io_lib:format("Error obtaining lock status, reason: ~s", [Reason]))}
               end;
           {error, Reason} ->
  -            {error, lists:flatten(io_lib:format("Error while acquiring lock, reason: ~w", [Reason]))}
  +            {error, lists:flatten(io_lib:format("Error while acquiring lock, reason: ~s", [Reason]))}
       end.
   
   
  
positive.code:             EndTime = Now + autocluster_config:get(lock_wait_time),
              lock(SessionId, Now, EndTime);
          {error, Reason} ->
             lists:flatten(io_lib:format("Error while creating a session, reason: ~w", [Reason]))
      end.
  
  
  
negative.code:         {ok, true} ->
              ok;
          {ok, false} ->
              {error, lists:flatten(io_lib:format("Error while releasing the lock, session ~s may have been invalidated", [SessionId]))};
          {error, _} = Err ->
              Err
      end.
  