Added check for the number of arguments in main()