init: allow last line to be not terminated by '\n'