updated doc paths.
bugfix: correctly return error code.