added file input to script, input files can be added in input directory and specified on command line