fix bugs, adjust format of log