duplicate and file exist issue resolved