moving argv check to the beginning of script