generates random numbers in a file