Logs apparently not working properly

It looks like Python is buffering the messages. Try adding flush=True to your print(). ie:

print("[NAME]:", name, file=sys.stdout, flush=True)