public static void writeToFile( String fileName, String content ) {
        File file = new File( fileName );

        file = new File( file.getParent() );
        if ( !file.exists() )
            file.mkdirs();
        try {
            PrintWriter pw = new PrintWriter( fileName );
            pw.write( content );
            pw.close();

        }
        catch ( FileNotFoundException e ) {
            e.printStackTrace();
        }
    }