Add a better behavior when passing an invalid loglevel