better error checking on missing metadata files