Switched to custom Error Types