improve command line argument checking