added support for taking a few files at a time