Fixed duplicate file bug