shouldn't access the tempFilesMap if useFilesFromTempProperty is false; you can move this below in the sync block
also, can't we always use intern()? so we wouldn't need this extra check