Added check for command line arguments