add optional port setting to command line