latest_change_id: Fix a stdout.write call

Fixes #3272