Hi Ne, we made a copy practically exactly of moodle/files/index.php because we needed almost the same script, but the main function (the import) is diferent, that's why we did a copy and made some changes we needed, for example the import function.
Regards