Use getHostName() instead of getHostString() for compatibility with Java 1.6 (easier than installing Java 1.7 on test machine)