Your original file has the following:
store,image,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock
While the last one has this:
store,websites,attribute_set,type,category_ids,sku,has_options,name,url_key,gift_message_available,meta_title,meta_description,image,small_image,thumbnail,gallery,options_container,page_layout,image_label,small_image_label,thumbnail_label,url_path,price,special_price,cost,weight,status,tax_class_id,visibility,enable_googlecheckout,is_recurring,is_imported,description,short_description,meta_keyword,custom_layout_update,special_from_date,special_to_date,news_from_date,news_to_date,custom_design_from,custom_design_to,qty,min_qty,use_config_min_qty,is_qty_decimal,backorders,use_config_backorders,min_sale_qty,use_config_min_sale_qty,max_sale_qty,use_config_max_sale_qty,is_in_stock,low_stock_date,notify_stock_qty,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,stock_status_changed_automatically,use_config_qty_increments,qty_increments,use_config_enable_qty_increments,enable_qty_increments,product_name,store_id,product_type_id,product_status_changed,product_changed_websites
You want to update qty ($data[2]), but the column for the last one is attribute_set. Those two files are not the same.