Write device mac addresses and hostname
Improve logging