Added factory json conversion on addfile