fix few errors in docs
better exception handling