add switch for metadata preloading