We might need to replace this with something more sophisticated if some scripts use more flow control (e.g. if, while)