fix many bugs and add loggings
v0.0.3