add port check to avoid bind used port.