Added guard for auto run, improved logging.