I added error detection to tell the user to supply more arguments or provide the proper file type. - Sai