Hi Hittesh Ahuja,
I follow your instruction and add the code in else part after create category.
But still having same error, even i update the code error display for old function.
i already Purge all caches. Is there any thing that i need to do to remove cache ?
also what about the function to update image fields ?
where should i add code to update file field ?
see below images.