added validation to port check utility