update logs and format codes