Use the hostname entered into the ui.
Don't close resources while still using them.