check port availability before starting mock collector