Sì, ho provato sia a fare flush() al posto di chiudere bw, e anche flush() e dopo bw.close(), ma niente.