Fixed handling of server unavailability and extracted out functions to handle build name formatting