Add the  check if the success file is insert

Adding the condition to check if the success file is only for insert.