Clear filename before creating new one in loop for gain file writing.
Thanks to Rudolf Schimassek @KIT for spotting.
Merge branch 'master' of github.com:psi46/pxar