Avoid raising error before unmount dmg