added command line option to specify a file type