function validateAvailablePorts(profile, existingProfiles) {
        const keys = Object.keys(profile)
        const existingPorts = existingProfiles.reduce((all, p) => all.concat(getPortsFromProfile(p)), []).concat(defaultPorts)
        const portKeys = keys.filter(k => /^port.*/.test(k))
        let match = false
        for(let i = 0; i < portKeys.length; i++) {
            if(existingPorts.indexOf(profile[portKeys[i]]) > -1) {
                match = true
                log(profile[portKeys[i]] + ' is already in use')
            }
        }
        return !match

        /**
         * 
         * @param {Profile} profile 
         * @returns {number[]}
         */
        function getPortsFromProfile(profile) {
            const keys = Object.keys(profile)
            const portKeys = keys.filter(k => /^port.*/.test(k))
            return portKeys.map(k => profile[k]).filter(v => v !== undefined)
        }
    }
Checks available ports agains all profiles and default values

@param {Profile} profile 
@param {Profile[]} existingProfiles 
@returns {boolean}