fix print(svg) file exists check going to infinite loop by trim string