Fetch hostname dynamically