improve error checking
0.0.6