Fix format string bugs in addscript