Added options for file type and basic error checking in main method