progressLogger :: GlobalState -> IO ()
progressLogger globalState = forever $ do
  torrents <- atomically $ readTVar (globalStateTorrents globalState)
  let printBitField state = do
        bf <- atomically $ readTVar $ torrentStateBitField state
        print bf
  traverse_ printBitField torrents
  threadDelay 5000000
progressLogger :: GlobalState -> IO ()
progressLogger globalState = forever $ do
  torrents <- atomically $ readTVar (globalStateTorrents globalState)
  let printBitField state = do
        bf <- atomically $ readTVar $ torrentStateBitField state
        print bf
  traverse_ printBitField torrents
  threadDelay 5000000
progressLogger globalState = forever $ do
  torrents <- atomically $ readTVar (globalStateTorrents globalState)
  let printBitField state = do
        bf <- atomically $ readTVar $ torrentStateBitField state
        print bf
  traverse_ printBitField torrents
  threadDelay 5000000