simplified config, moved error reporting inside the library