function import(script, args, line)
	if (#args < 1) then
		err(script, {"Not enough arguments"}, line);
	else
		if (#args == 1) then --Only one for now
			if (_G.Acen.Files[args[1]]) then
				local target = _G.Acen.Files[args[1]];
				local source = "";

				for i, v in pairs(target.Source) do
					source = source..v;
				end

				script.Source = [[]]..source..[[]]..script.Source;
			else
				err(script, {"'"..args[1].."' does not exist"}, line);
			end
		end
	end
end

This snippet of code in my plugin causes the studio to crash every single time it edits the source. How can I avoid the studio crash but still have the function edit a script's source?

Any help is greatly appreciated.