Update generate.php