refactored into uploader and fileCollector class