Strip whitespace when reading hostname