propagate file close error (bnc #820339)
speed up device scanning code by avoiding external program calls (bnc #823601)
fix duplicate boot label handling (bnc #828498)
propagate file close error (bnc #820339), part 2