add status line and eof marker