maintain backwards compatibility of returncode in ScriptTask