Finished off get file with criteria function