Print error message when can't bind * on any address.
Opening TCP listening ports refactored into a function.