added support for System.out and System.err