fix a log typo error in decode function, and refactoried the log code
rename the variables & add the options section in README.md