public static void appendToFile( String fileName, String content ) {

        File file = new File( fileName );
        file = new File( file.getParent() );

        if ( !file.exists() ) {
            file.mkdirs();
        }

        FileWriter fw = null;

        try {

            fw = new FileWriter( fileName, true );
            fw.write( content );
            fw.close();

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