pub fn stats_loop(silent: bool, stats_rx: Receiver<usize>) -> Result<()>