added port check wrapper