Trap errors properly when updating package fails.