Fix bug in uninstall script and log when failing the PHP side.