Support for mac (multiple networks, and better logging)