added the storing of the original file name
added pattern filter