Finds an open port and sends the output to stdout