Added ReadOutput function.