Changes to execute both gridfs and mgridfs