Additional checks and a handle exceptions wrapper added.