rand write logging