Move some logic outside of main function, check for negative command line arg.