Fix reading metadata file

Need to call the ```.sync``` function, otherwise it does it asynchronously and there's nothing to return