Update API

* Add return code of 1 in case of error and redirect error messages
  to STDERR.
Update documentation: README.md