move error logic.
0.1.1