Remove obsolete conditional code, improve logging.