Add timeout flag, tweak logging.