some bugs fixed and log started