Added hostname check when logging