added logic for choosing which files to send in main.py