public int addProperty(String name, Object value) {
      int index = -1;
      try{
         if(isPath(name)){
            SectionPath sp = new SectionPath(name);
            if(sp.isValid() && sp.addressesProperty()){
               Property prop = new Property(sp.getPropertyPart(), value);
               Section s = getSection(name);
               if(prop != null && s != null){
                  index = s.add(prop);
               }
               else{
                  logger.error("An error occurred adding property with path specification: " +name);
               }
            }
            else{
               logger.error("Section.addProperty: " + "specified path is not valid!");
            }
         }
         else{
            Property prop = new Property(name, value);
            index = this.add(prop);
         }
      }
      catch (Exception e) {
         logger.error(e.getLocalizedMessage());
      }
      return index;
   }