Separated errors and outputs in return values