Assign the ID earlier in the process for sake of logscan.