public static void main(String[] args){
  PrintStream ps=null;
  try {
    ps=new PrintStream(System.out,true,"UTF-8");
    ps.println(transform(args));
  }
 catch (  Throwable t) {
    t.printStackTrace();
    if (ps != null)     ps.println(TRANSFORMATION_FAILED_FLAG);
    if (t instanceof Error)     throw (Error)t;
  }
}

public static void main ( String [ ] args ) { PrintStream ps = null ; try { ps = new PrintStream ( System . out , true , "UTF-8" ) ; ps . println ( transform ( args ) ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; if ( ps != null ) ps . println ( TRANSFORMATION_FAILED_FLAG ) ; if ( t instanceof Error ) throw ( Error ) t ; } }
main method being triggered in step 3 of the workaround . < p > method prints out transformation_failed_flag if something went wrong .
