fix documentation and handle exceptions.
change README.md