Thanks again eschwartz
Yes, your version seem much more solid and clean !
I'm a drawer, not a coder, so I admit my scripts are far from perfect...
If I publish my whole script on github, which is meant to generate .cbz, .epub, .pdf for ebooks and print from individual .svg files, are you interested in reviewing it ?
I'm sure you will give it a valuable clean up and boost