move file uploading into a separate, concurrent thread