Moving unique string generation into getOutput