lib: better error reporting
0.5.1