updated cli.php script