Android: flush output before check it