public void writeTo(String outname)
        throws IOException {
        if(!assembled) {
            throw new IllegalStateException("assemble method must be called before writeTo");
        }

        WordWriter out;
        if(outname.equals("-")) {
            out = new WordWriter(System.out, littleEndian);
        } else {
            out = new WordWriter(new FileOutputStream(outname, false), littleEndian);
        }
        try {
            resolvables.writeTo(out);
        } finally {
            out.close();
        }
    }