added the working version of connectFiles.py