added possibility of specifying a filename pattern to the file names in directories. See instrument.fnamePattern