Added asserts, improved message/assert on lock failure