address sscanf format request from maintainers and fix g_string_free and newsize test