Fix null deref if file starts with a newline