loadMetadata now has also the prepareoptions parameter