script generation and health check