Check number of command line arguments

Fixed bug in checking number of command line arguments