Added some functionality to Output.php