Move hostname variable to the top