Added pragma to load libraries and fixed up test code

Caught unhandled exception in ServiceLocator exception
Added dns server as command line argument