Eliminated a race condition in upload() method (with async.map).