changed logic to continue scanning metadata even if it encounters an error