add log and protocol