code: public IChemObjectWriter createWriter(IChemFormat format) {
          if (format != null) {
              String writerClassName = format.getWriterClassName();
              if (writerClassName != null) {
                  try {
                      if (registeredReaders.containsKey(writerClassName)) {
                          Class<IChemObjectWriter> writer = registeredReaders.get(writerClassName);
                          if (writer != null) return writer.newInstance();
                      }
                      // make a new instance of this class
                      return (IChemObjectWriter) this.getClass().getClassLoader().loadClass(writerClassName)
                              .newInstance();
                  } catch (ClassNotFoundException exception) {
                      logger.error("Could not find this ChemObjectWriter: ", writerClassName);
                      logger.debug(exception);
                  } catch (InstantiationException | IllegalAccessException exception) {
                      logger.error("Could not create this ChemObjectWriter: ", writerClassName);
                      logger.debug(exception);
                  }
              } else {
                  logger.warn("ChemFormat is recognized, but no writer is available.");
              }
          } else {
              logger.warn("ChemFormat is not recognized.");
          }
          return null;
      }
docs: Creates a new IChemObjectWriter based on the given IChemFormat.