Remove debug_info from logs. Your script must also work if it is run twice (the second run should not fail).
debug_info
logs
Run your code to see the output here.