improve error handling and docs (Config)