Randomize trials and save key as a single file