improve stability for restful apis; update lib/command/README.md to explain how cortex server works