write svg to debug.svg if debug is enabled.
update screenshot.