Added support for command line arguments and added a function to update the IP address only when it has changed