What about just returning err and handling this with the other errors in main()? Maybe even inline tool() into main(). Before your changes this was a separate function because I wanted to do early `return err`. Now this is not necessary any more.