public String toString(String session) {
        String cmdStr;
        cmdStr = action + " tag=" + identifier + (tag==null?"":":"+tag) + "-" + queryId;

        if(session != null) cmdStr += "&s=" + session;

        for (Entry<String, String> arg : params.entrySet()) {
			cmdStr += "&" + arg.getKey() + "=" + arg.getValue();
		}

        return cmdStr;
	}