Use unbuffered /dev/random and flush stdout