throwing error for unknown mode
0.2.1 reports error for unknown mode