Reverse operation order
Close streams and socket when disconnected
Add print message to inform user on ip address and port number