Fix saving statistics to file

3 jobs for v1.8.0rc10 in 12 minutes and 10 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #21430
linux
build-linux

00:10:18

passed #21431
win
build-win

00:08:52

 
  Deploy
passed #21432
linux conda
deploy-stable

00:01:52