adding code to generate random state file from seed