ServiceCollection class, better error output