add better logging when creating scripts