Added threading to uploads and downloads