api changes, now can specify output file, min/max gram