Allowing the port to be both int and string

`%d` expects an `int`, but using `.format` allows `port` to be also a string.