Let f : X → U be a projective morphism of normal varieties and (X, ∆) a dlt pair. We prove that if there is an open set U 0 ⊂ U , such that (X, ∆) × U U 0 has a good minimal model over U 0 and the images of all the non-klt centers intersect U 0 , then (X, ∆) has a good minimal model over U . As consequences we show the existence of log canonical compactifications for open log canonical pairs, and the fact that the moduli functor of stable schemes satisfies the valuative criterion for properness.