Merge pull request #4 from atdog/master

use access_flag_string to make code readable
add some comment
remove unuse block depth
write log when command not handled & add some comment