Moved logger init within the exception, so that they don't override configured settings