the naming is weird as it also deals with exception, not only with output