also, avoid orphan character on the last line