I agree its safer but as this will only be executed once by a developer importing the CSV data (that is if the developer does not choose to import the JSON data via the import facility in Mongo) and is not part of the web site code.