Add debug flag to ScriptHelper and update documentation