Added hostname
Updated hostname handling