Niels Frederik Schlegel ,justitiarie