Fix errors in additional logging code