Added exception control and capture details of instances and keys created