Removed fail in lib code. Replaced with panic in test code