IP and mode of running are now reading from commandline arguments