Add check as to whether file already exists or not before uploading.
Cache directory names that have already been checked/created.