append data to result and added a file pattern match