Separated some exception handling

Change-Id: I05e437d7eabedf211880174f1ad2e2bdbc85f64e