Modify to use template to create each scripts