Updated code for Magmi