Update the Random() function to allow an upper bound of 2**32-1
Open and close random device just once
Update on the recent bug and fix