Output stream interception