diff --git a/lib/get-unused-file-path.js b/lib/get-unused-file-path.js
index <HASH>..<HASH> 100644
--- a/lib/get-unused-file-path.js
+++ b/lib/get-unused-file-path.js
@@ -2,6 +2,8 @@
 
 var fs = require("fs");
 var uuid = require("node-uuid");
+var recentlyUsedFileNames = [];
+var lastLength = 0;
 
 var generateNewPath = function (path) {
     return path.replace(/[^\/]*(\.[a-z]{3,4})$/, uuid.v4() + "$1");
@@ -9,11 +11,22 @@ var generateNewPath = function (path) {
 
 module.exports = function getUniqueFilePath(path, cb) {
     fs.exists(path, function (exists) {
-        if (exists) {
+        if (exists || recentlyUsedFileNames.indexOf(path) != -1) {
             var newPath = generateNewPath(path);
             return getUniqueFilePath(newPath, cb);
         }
 
+        recentlyUsedFileNames.push(path);
         cb(path);
     });
 };
+
+setInterval(function () {
+    if (!lastLength) {
+        lastLength = recentlyUsedFileNames.length;
+        return;
+    }
+
+    recentlyUsedFileNames = recentlyUsedFileNames.slice(lastLength);
+    lastLength = recentlyUsedFileNames.length;
+}, 60000);
remove rename file race condition with a recently used file names cache