Fix issue duplicate file when file is created