Merge pull request #10 from cuixin/master

fixed bugs.
add log