Basic deep learning classifiers used for medical images often produce global labels. While annotation for localized disease detection might be costly, the knowledge of prevalence of conditions in different anatomical areas can help improve the accuracy by limiting the classifier to relevant areas. However, this improvement provided by context knowledge, is usually offset by the errors of the segmentation map used to isolate the area of interest. This paper proposes a framework for disease classification consisting of a segmentation network, a segmentation quality assessment network, and two separate classifiers on whole image and relevant segmented area. The quality assessment network controls the impact of the two disease classifiers on the final outcome, utilizing the masked image only when segmentation is acceptable. We show that in a very large dataset of chest X-ray images, this framework produces a 2% increase in the area under ROC curve for classification compared to a baseline.