modified nextBytes to use os.urandom for longer strings