@Acanterelle I believe you're running into the issue of the number of nonces having to be an exact multiple of the stagger. You can calculate the number of nonces that will fit on your drive, but that number needs to be a multiple of the stagger.
For example, If I tell the plotter to plot 19 blocks with a stagger of 10 blocks, it's going to plot 20 nonces, not 19. That extra nonce will corrupt your file if there is not sufficient space.
To calculate the correct number of nonces:
Floor((<drive size in Bytes>/262144) / <stagger>) * <stagger>