Made some changes in KettleOutput class to eliminate duplicated code and cleaner access to the outputstream and content of KettleOutput