added ability to limit the number of files uploaded at any time, useful for testing