Fixed bug where IP address and port number are not retained in file.