Bug fix for getting Sequence labels

Bug fix for how labels are obtained and error handling added for cases of unexpected failure, so that other files are still calculated.