Strip the last printed line to avoid useless '\n'