remove final empty lines eof