Use exception save lock

Instead of manually lock and unlock mutex

Change-Id: I6c8952358eba8bacc6f9dd08f227e5120d243712