movefile procedure add a TEMPEXT (temp extension) while copying.
fixed json file moving after dat files