index args.output[0] for writing to a file