Store registered metrics and services
Improve error handling