Output error on invalid SVG

Credits for finding this go out to @alpadev.