Update automate.php