Function createJSONfile now return file id