how to check if port is open mac terminal