internals.output expects an error object, updated double call check on done to provide such