Set multiple environments and add error deal

1. Add environments including "development", "offline" and "production",
see more info in README.md
2. add uncompleted error handlers, need more time to finish